package com.imy.lua.manger.thread;

import com.imy.common.util.ALog;

import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;

public class ThreadManger {

  private static final int THREAD_NUM=3;
  private static ExecutorService newSingleThreadExecutor;
  public static boolean setUserScriptThread ;
  private ThreadManger(){

  }
  public static ExecutorService getScriptThread(){
    if (newSingleThreadExecutor==null){
      newSingleThreadExecutor = Executors.newSingleThreadExecutor();
    }
    return newSingleThreadExecutor;
  }

  public static void setScriptFlag(boolean b) {
    setUserScriptThread =b;
  }
}
